//reduce  计算
let arr = ['a','b','c'];
//依次取出数组中的每一个元素,传递给函数

const sum = arr.reduce(function(sum,item,index){
    console.log(sum,item,index);
    return sum+item;
},'');
console.log(sum);


let arr2 = [4,5,6];
let arr3 = [...arr2];
console.log(arr3);
let [...arr4]=arr2;
console.log(arr4);
